/*
 * TagLong.h
 *
 *  Created on: 18 juin 2011
 *      Author: Pierrick Caillon <pierrick@megami.fr>
 */

#ifndef TAGLONG_H_
#define TAGLONG_H_

#include "NamedTag.h"
#include "NumericValueTag.h"
#include <sys/types.h>

namespace NamedBinaryTag
{

class __attribute__((visibility("default"))) TagLong: public NamedBinaryTag::NamedTag,
		public NamedBinaryTag::NumericValueTag<sizeof(int64_t)>
{
private:
	int64_t value;
public:
	TagLong();
	virtual ~TagLong();

	TagTypes get_TagType() const;

	void Read(std::istream &input, bool ignoreName);
	void Write(std::ostream &output, bool ignoreName) const;

	int64_t get_Value() const;
	void set_Value(int64_t value);

	ITag *clone() const;
protected:
	TagLong(void *root) : NamedTag(root) {}
	ITag *clone(void *newRoot) const;
};

}

#endif /* TAGLONG_H_ */
